package cn.com.rexen.rplus.sa.model;

import java.util.ArrayList;
import java.util.List;

/**
 * 角色对象vo（主要用于前段显示）.
 * @author zhanghai
 *
 */
@SuppressWarnings("serial")
public class RoleVO extends BaseVO {

	/**
	 * 角色id.
	 */
	private String id;


	/**
	 * 角色名称.
	 */
	private String name;


	/**
	 * 父角色名称.
	 */
	private String parent;


	/**
	 * 父角色id.
	 */
	private String parentid;

	/**
	 * 权限列表.
	 */
	private List<PermissionVO> premission = new ArrayList<PermissionVO>();

	/**
	 * 用于前台显示前段树型菜单结点是否是子结点.type="folder" 或type="item".
	 */
	private String type;

	/**
	 * 默认构造.
	 */
	public RoleVO() {
		super();
	}

	/**
	 * @param id
	 * @param name
	 * @param parent
	 * @param parentid
	 */
	public RoleVO(String id, String name, String parent, String parentid) {
		super();
		this.id = id;
		this.name = name;
		this.parent = parent;
		this.parentid = parentid;
	}
	
	
	/**
	 * @param id
	 * @param name
	 * @param parent
	 * @param parentid
	 * @param premission
	 */
	public RoleVO(String id, String name, String parent, String parentid,
			List<PermissionVO> premission) {
		super();
		this.id = id;
		this.name = name;
		this.parent = parent;
		this.parentid = parentid;
		this.premission = premission;
	}


	/**
	 * 构造方法.
	 * @param id 主键id
	 * @param name 角色名称.
	 * @param parent 父角色名称.
	 * @param parentid 父角色id.
	 * @param premission 权限.
	 * @param type 结点类型.
	 */
	public RoleVO(String id, String name, String parent, String parentid,
			List<PermissionVO> premission, String type) {
		super();
		this.id = id;
		this.name = name;
		this.parent = parent;
		this.parentid = parentid;
		this.premission = premission;
		this.type = type;
	}


	/**
	 * @param id
	 * @param name
	 * @param parent
	 * @param parentid
	 * @param type
	 */
	public RoleVO(String id, String name, String parent, String parentid,
			String type) {
		super();
		this.id = id;
		this.name = name;
		this.parent = parent;
		this.parentid = parentid;
		this.type = type;
	}


	/**
	 * @return the id
	 */
	public String getId() {
		return id;
	}


	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}


	/**
	 * @return the parent
	 */
	public String getParent() {
		return parent;
	}


	/**
	 * @return the parentid
	 */
	public String getParentid() {
		return parentid;
	}


	/**
	 * @return the premission
	 */
	public List<PermissionVO> getPremission() {
		return premission;
	}


	/**
	 * @return the type
	 */
	public String getType() {
		return type;
	}


	/**
	 * @param id the id to set
	 */
	public void setId(String id) {
		this.id = id;
	}


	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}


	/**
	 * @param parent the parent to set
	 */
	public void setParent(String parent) {
		this.parent = parent;
	}

	/**
	 * @param parentid the parentid to set
	 */
	public void setParentid(String parentid) {
		this.parentid = parentid;
	}



	/**
	 * @param premission the premission to set
	 */
	public void setPremission(List<PermissionVO> premission) {
		this.premission = premission;
	}


	/**
	 * @param type the type to set
	 */
	public void setType(String type) {
		this.type = type;
	}




}
